1
'****************************** Module Header ******************************\
2 ' Module Name: Show.aspx.vb
3 ' Project: VBASPNETSearchEngine
4 ' Copyright (c) Microsoft Corporation
6 ' This page shows an individual record from database according to Query String
9 ' This source is subject to the Microsoft Public License.
10 ' See http://www.microsoft.com/opensource/licenses.mspx#Ms-PL.
11 ' All other rights reserved.
13 '*****************************************************************************/
15 Partial
Public Class Show
16 Inherits System
.Web
.UI
.Page
18 ''' The record which is displaying.
20 Protected Data
As Article
22 Protected
Sub Page_Load(ByVal sender
As Object, ByVal e
As EventArgs
) Handles
Me.Load
25 ' Only query database in the first load and ensure the input parameter is valid.
27 AndAlso
Not String.IsNullOrEmpty(Request
.QueryString("id")) _
28 AndAlso
Long.TryParse(Request
.QueryString("id"), id
) Then
29 Dim dataAccess
As New DataAccess()
30 Data
= dataAccess
.GetArticle(id
)
33 ' Ensure the result is not null.
34 If Data Is
Nothing Then